package innerclass.匿名内部类;

/**
 * Created by chengxiaoqi1 on 2018/8/26.
 * 匿名内部类就是没有名字的内部类
 */
abstract class Person {

    public abstract void eat();

}


class Child extends Person {


    @Override
    public void eat() {
        System.out.println("eat sth");
    }

}

public class Demo {

    public static void main(String[] args) {
        Person p = new Child();
        p.eat();
    }


}
